package com.ruoyi.system.service.impl;

import java.util.List;

import com.ruoyi.system.domain.Goods;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.PurchasedetailsMapper;
import com.ruoyi.system.domain.Purchasedetails;
import com.ruoyi.system.service.IPurchasedetailsService;

/**
 * 采购单详情Service业务层处理
 * 
 * @author xy
 * @date 2023-12-27
 */
@Service
public class PurchasedetailsServiceImpl implements IPurchasedetailsService 
{
    @Autowired
    private PurchasedetailsMapper purchasedetailsMapper;

    /**
     * 查询采购单详情
     * 
     * @param purchaseDetailsID 采购单详情主键
     * @return 采购单详情
     */
    @Override
    public List<Goods> selectPurchasedetailsByPurchaseDetailsID(Long purchaseDetailsID)
    {
        return purchasedetailsMapper.selectPurchasedetailsByPurchaseDetailsID(purchaseDetailsID);
    }

    /**
     * 查询采购单详情列表
     * 
     * @param purchasedetails 采购单详情
     * @return 采购单详情
     */
    @Override
    public List<Purchasedetails> selectPurchasedetailsList(Purchasedetails purchasedetails)
    {
        return purchasedetailsMapper.selectPurchasedetailsList(purchasedetails);
    }

    /**
     * 新增采购单详情
     * 
     * @param purchasedetails 采购单详情
     * @return 结果
     */
    @Override
    public int insertPurchasedetails(Purchasedetails purchasedetails)
    {
        return purchasedetailsMapper.insertPurchasedetails(purchasedetails);
    }

    /**
     * 修改采购单详情
     * 
     * @param purchasedetails 采购单详情
     * @return 结果
     */
    @Override
    public int updatePurchasedetails(Purchasedetails purchasedetails)
    {
        return purchasedetailsMapper.updatePurchasedetails(purchasedetails);
    }

    /**
     * 批量删除采购单详情
     * 
     * @param purchaseDetailsIDs 需要删除的采购单详情主键
     * @return 结果
     */
    @Override
    public int deletePurchasedetailsByPurchaseDetailsIDs(Long[] purchaseDetailsIDs)
    {
        return purchasedetailsMapper.deletePurchasedetailsByPurchaseDetailsIDs(purchaseDetailsIDs);
    }

    /**
     * 删除采购单详情信息
     * 
     * @param purchaseDetailsID 采购单详情主键
     * @return 结果
     */
    @Override
    public int deletePurchasedetailsByPurchaseDetailsID(Long purchaseDetailsID)
    {
        return purchasedetailsMapper.deletePurchasedetailsByPurchaseDetailsID(purchaseDetailsID);
    }
}
